package com.tuzhi.gateway;

import com.tuzhi.AppGateway;
import com.tuzhi.gateway.httpclient.face.AuthApi;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import javax.annotation.Resource;

@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest(classes = AppGateway.class)
@ActiveProfiles({"comm", "dev"})
public class test {
    @Resource
    AuthApi authApi;

    @Test
    public void test() {
        String token="eyJhbGciOiJIUzUxMiJ9.eyJqdGkiOiIyYTVkNzFlMS1iNTgyLTQ2MjUtYTZiYi1iNWFiY2Y5YWQ2YTkiLCJpYXQiOjE3MDM1ODM0NDUsIm5iZiI6MTcwMzU4MzQ0NSwiZXhwIjoxNzA0MTg4MjQ1fQ.hy4YTp2tDy8qe-J41u2gK4pSKNdcUftyClnTAObrYd7UF9JQrZgSq5XM_dcrg4-0eEA42NlsiwP5ah-PRN9wgg";
//        LoginUserBO loginUserBO = authApi.getLoginUser(token);
//        System.out.println(loginUserBO);
//        System.out.println(loginUserBO.);
        String refreshToken= authApi.tokenIsExpRefresh(token);
        System.out.println("refreshToken:"+refreshToken);
    }
}
